package com.example.myapplication.presenter;


import com.example.myapplication.base.RxPresenter;
import com.example.myapplication.presenter.contract.HomeContract;

import java.util.List;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;

/*      *
 * Created by yin97 on 2017/4/4.
 */

public class HomePresenter extends RxPresenter<HomeContract.View> implements HomeContract.Presenter {


    @Override
    public void requestSplashData(RequestBody user_name, MultipartBody.Part part) {
//        Observable<HttpResult<ImageBean>> observable =  RetrofitHelpers.getInstance().createHttp(1).getUpload(user_name,part);
//        observable.compose(RxSchedulers.compose()).subscribe(new Observer<HttpResult<ImageBean>>() {
//            @Override
//            public void onSubscribe(Disposable d) {
//
//            }
//
//            @Override
//            public void onNext(HttpResult<ImageBean> value) {
//                Logger.i( value.data.get(0).getUser_image());
//
//            }
//
//            @Override
//            public void onError(Throwable e) {
//
//            }
//
//            @Override
//            public void onComplete() {
//
//            }
//        });
//             observable.compose(
//        );

//        Disposable disposable= RxCallback.create(RetrofitHelpers.getInstance().createHttp(1).getinitview())
//                .compose(RxUtil.rxSchedulerHelper())
//                .subscribe(s -> {
//                    Logger.i(s.getMsg());
//                });
//        addDisposable(disposable);
//        addDisposableTime(disposable);
     mView.scouss("sb");
    }

    @Override
    public void requestSplashDatas(RequestBody user_name,  List<MultipartBody.Part> part) {
//        Observable<HttpResult<ImageBean>> observable =  RetrofitHelpers.getInstance().createHttp(1).getUploads(user_name,part);
//        observable.compose(RxSchedulers.compose()).subscribe(new Observer<HttpResult<ImageBean>>() {
//            @Override
//            public void onSubscribe(Disposable d) {
//
//            }
//
//            @Override
//            public void onNext(HttpResult<ImageBean> value) {
//                Logger.i( value.data.get(0).getUser_image());
//
//            }
//
//            @Override
//            public void onError(Throwable e) {
//
//            }
//
//            @Override
//            public void onComplete() {
//
//            }
//        });
    }
}
